# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-osprofiler
pkgver=3.4.3
pkgrel=2
pkgdesc="OpenStack Profiler Library"
arch=('any')
url="https://docs.openstack.org/osprofiler/latest/"
license=('Apache')
depends=('python-netaddr' 'python-oslo-concurrency' 'python-oslo-serialization' 'python-oslo-utils'
         'python-prettytable' 'python-requests' 'python-six' 'python-webob')
checkdepends=('python-ddt' 'python-docutils' 'python-elasticsearch' 'python-jaeger-client'
              'python-pymongo' 'python-redis' 'python-stestr')
source=("https://github.com/openstack/osprofiler/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('ce888efd59ad2a34f8f09cdcaa4e0174c17787c1136627b9886993f6e368385fe887a45b24954c19851a8d8d02f2c772d651e66b0746de95ed012cb1af71e5db')

export PBR_VERSION=$pkgver

build() {
  cd osprofiler-$pkgver
  python setup.py build
}

check() {
  cd osprofiler-$pkgver
  stestr run
}

package() {
  cd osprofiler-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
